package com.example.controller;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description TODO
 * @Author zhaoluowei
 * @Date 2019/8/4  23:29
 * @Version 1.0
 */

@RestController
@RequestMapping(value = "/test")
@Slf4j
public class TestController {

    @RequestMapping(value = "/login")
    public String method(@RequestBody JSONObject jsonObject){
        String username = jsonObject.getString("username");
        String password = jsonObject.getString("password");
        log.info("username --> "+username);
        log.info("password --> "+password);
        //数据库
//        if()


        return "Hello";
    }


}
